﻿@model Dinamico.Models.LogOnModel

@{
    ViewBag.Title = Content.Translate.Text("Log On");
}

<h1>@Content.Translate.Text("Log On")</h1>
<p>
	@Content.Translate.Text("Please enter your username and password.") @Html.ActionLink(Content.Translate.Text("Register"), "Register", new { returnUrl = Request["returnUrl"] }) @Content.Translate.Text("if you don't have an account.")
</p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script>
	$(document).ready(function () {
		$(".editor-field:first input").focus();
	});
</script>

@Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.")

@using (Html.BeginForm()) {
    <div>
        <fieldset>
            <legend>@Content.Translate.Text("Account Information")</legend>

            <div class="editor-label">
                @Html.LabelFor(m => m.UserName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.UserName)
                @Html.ValidationMessageFor(m => m.UserName)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>

            <div class="editor-label">
                @Html.CheckBoxFor(m => m.RememberMe)
                @Html.LabelFor(m => m.RememberMe)
            </div>

            <p>
                <input type="submit" value="@Content.Translate.Text("Log On")" />
            </p>
        </fieldset>
    </div>
}
